<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>创建数据库-bycms</title>
	<link type="text/css" href="__CSS__/index.css" rel="stylesheet">
	<link type="text/css" href="__CSS__/style.css" rel="stylesheet">
	<script type="text/javascript" src="__COMMON__/jquery.min.js"></script>
	</head>
	<body>
		<div class="border">
			<div class="header">
				<span class="logo"></span>
				<span class="intro">安装向导</span>
			</div>
			<div class="install_steps">
				<div class="steps  active"><span class="num">1</span>安装协议
					<span class="arrow"></span>
				</div>
				<div class="steps  active"><span class="num">2</span>环境检测
					<span class="arrow"></span>
				</div>
				<div class="steps active"><span class="num">3</span>创建数据库
					<span class="arrow"></span>
				</div>
				<div class="steps  active"><span class="num">4</span>安装
					<span class="arrow"></span>
				</div>
				<div class="steps"><span class="num">5</span>完成
					<span class="arrow"></span>
				</div>
			</div>
			<div class="rule_title">bycms V1.0<span>安装协议</span></div>
			<div class="rules">
	
                
     <h1>安装</h1>
      <div id="ul-list" >
  
      </div>
	  <script type="text/javascript">
        var list   = document.getElementById('ul-list');
		
         function show_log(log, classname){
            var li = document.createElement('p'); 
            li.innerHTML = log;
            classname && li.setAttribute('class', classname);
            list.appendChild(li);
             var h=$("#ul-list").scrollTop ()+ 30;;
             $("#ul-list").scrollTop(h);
        }
       
        
  
      function timer(){ 
	      var url="{$url}";
	      window.setTimeout(window.location.href=url,18000);
	  }
    </script>
		{php}use think\Db;
	    $config= session('db_config');
		//动态定义连接信息
       
        $db=Db::connect($config);
		
		//创建数据表
		 create_db_tables($db,$config['prefix']);

		if(!session('error')){			
			   session('step', 3);
			   echo "<script type='text/javascript'>timer()</script>";
			  
		}
	
{/php} 			
			</div>
		    <div class="btn_group">
		    	
		    	<div class="agree"> 安装中</div>
		    	<div class="not_agree agree"><a  onclick="$('form').submit()">下一步</a</div>
		    </div>
		</div>
	</body>
</html>
